package com.bluetoothsms.common;

import com.bluetoothsms.common.Common.CallLogType;

public class MessageCallLog extends BluetoothMessage {

	public MessageCallLog(CallLogType type, CallLogEntry[] c) {
		super(BtMessageType.CallLog, null);

		mData = new String[1 + c.length * CallLogEntry.FIELD_COUNT];

		int i = 0;
		mData[i++] = String.valueOf(type.ordinal());

		for (CallLogEntry entry : c) {
			mData[i++] = entry.getName();
			mData[i++] = entry.getNumber();
			mData[i++] = String.valueOf(entry.getDate().getTime());
			mData[i++] = String.valueOf(entry.getDuration());
		}
	}
}
